var siteinfo = require("../siteinfo.js"), _api_root = "";

if (-1 != siteinfo.acid) {
    var siteroot = siteinfo.siteroot.substr(0, siteinfo.siteroot.indexOf("app/index.php"));
    _api_root = _api_root = siteroot + "addons/zjhj_mall/core/web/index.php?_acid=" + siteinfo.acid + "&r=api/";
} else _api_root = siteinfo.apiroot;

var api = {
    index: _api_root + "default/index",
    purchase:{
        index: _api_root + "purchase/purchase/index",//分类
        goods_list:_api_root + "purchase/purchase/goods-list",// 分类商品列表
        goods_info:_api_root + "purchase/purchase/goods-info",// 商品详情
        submit_confirm:_api_root + "purchase/order/submit-confirm",// 下单确认
        submit_order:_api_root + "purchase/order/submit-order",// 订单提交
        address_save: _api_root + "purchase/order/address-save",// 填写地址
        order_list:_api_root + "purchase/order/order-list",// 订单列表
        pay_order:_api_root + "purchase/order/pay-order",// 发起支付
        order_revoke:_api_root + "purchase/order/order-revoke",// 取消订单
        order_express_detail:_api_root + "purchase/order/order-express-detail",// 查看物流
        order_confirm:_api_root + "purchase/order/order-confirm",// 确认收货
        goods_attr_info:_api_root + "purchase/purchase/goods-attr-info",// 确认收货
    },
    default: {
        goods_qrcode_second: _api_root + "default/goods-qrcode-second",//分类商品海报
        goods_qrcode_integral: _api_root + "default/goods-qrcode-integral",//积分商品海报
        cate_qrcode: _api_root + "default/cate-qrcode",//专区海报
        marketing:_api_root + "default/marketing",//推品文案
        get_search_goods:_api_root + "default/get-search-goods",//搜索
        get_poster_status:_api_root + "default/get-poster-status",//生成二维码权限
        popular_goods:_api_root + "default/popular-goods",//人气好物列表
        super_video_list:_api_root + "default/super-video-list", //爱心助力视频
        video_like:_api_root +"sign_up/default/video-like",//视频点赞
        video_comments_list:_api_root +"default/video-comments-list",//视频评论列表
        add_video_comments:_api_root +"default/add-video-comments",//视频评论
        video_comments_like:_api_root +"default/video-comments-like",//视频评论点赞
        super_video_setting:_api_root +"default/super-video-setting",//超点赞设置信息index_status 0不开启 1开启 index_img  展示图片
        order_text_slide: _api_root + "default/order-text-slide",//超划算订单文字轮播接口
        supershop_cat_list:_api_root + "default/supershop-cat-list",//精品学院分类
        supershop_article_list:_api_root + "default/supershop-article-list",//精品学院列表
        supershop_article_detail:_api_root + "default/supershop-article-detail",//精品学院详情
        super_video_share:_api_root + "default/super-video-share",//转发奖励接口
        daily_task:_api_root + 'default/daily-task',//每日任务
        user_free_goods:_api_root + 'default/new-user-free-goods',//新会员免费兑换商品
        user_status:_api_root + 'default/user-status',//新用户
        text_new_user:_api_root + 'default/text-new-user',//新用户购买消息
        text_withdraw:_api_root + 'default/text-withdraw',//分销中心提现消息
        home_page:_api_root + 'default/home-page',//首页专区


        store: _api_root + "default/store",
        index: _api_root + "default/index",
        goods_list: _api_root + "default/goods-list",//往期推荐商品列表：
        cat_list: _api_root + "default/cat-list",
        goods: _api_root + "default/goods",
        district: _api_root + "default/district",
        goods_attr_info: _api_root + "default/goods-attr-info",
        upload_image: _api_root + "default/upload-image",
        comment_list: _api_root + "default/comment-list",
        article_list: _api_root + "default/article-list",
        article_detail: _api_root + "default/article-detail",
        video_list: _api_root + "default/video-list",
        goods_qrcode: _api_root + "default/goods-qrcode",
        coupon_list: _api_root + "default/coupon-list",
        topic_list: _api_root + "default/topic-list",
        topic: _api_root + "default/topic",
        navbar: _api_root + "default/navbar",
        navigation_bar_color: _api_root + "default/navigation-bar-color",
        shop_list: _api_root + "default/shop-list",
        shop_detail: _api_root + "default/shop-detail",
        topic_type: _api_root + "default/topic-type",
        buy_data: _api_root + "default/buy-data",
        goods_recommend: _api_root + "default/goods-recommend",
        search: _api_root + "default/search",
        nsearch: _api_root + "default/new-search",
        cats: _api_root + "default/cats",
        topic_qrcode: _api_root + "default/topic-qrcode",
        form_id: _api_root + "default/form-id",
        slide: _api_root + "default/slide",//首页轮播图
        hot_goods: _api_root + "default/hot-goods",//爆款推荐
        old_hot: _api_root + "default/old-hot",//爆款推荐
        goods_like: _api_root + "default/goods-like",//商品点赞
        hot_goods_list: _api_root + "default/hot-goods-list",//超爆品抢购
    },
    surprise:{
        index: _api_root + "surprise/index",//超惊喜
        pay_integral:_api_root + "surprise/pay-integral",//超惊喜滑动消耗爱心
        details:_api_root + "surprise/details",//商品详情
        submit_preview:_api_root + "surprise/submit-preview",//订单详情
        submit:_api_root + "surprise/submit",//下单支付
        list:_api_root + "surprise/list",//超惊喜订单接口
        revoke:_api_root + "surprise/revoke",//取消订单接口
        order_submit:_api_root + "surprise/order-submit",//订单付款接口
        confirm:_api_root + "surprise/confirm",//确定收货接口
        detail:_api_root + "surprise/detail",//订单详情
        exchange_index:_api_root + "limit-exchange/index",//限时兑换列表
        exchange_details:_api_root + "limit-exchange/details",//限时兑换商品详情
        exchange_submit_preview:_api_root + "limit-exchange/submit-preview",//限时兑换下单订单详情
        exchange_submit:_api_root + "limit-exchange/submit",//限时兑换提交订单
        exchange_list:_api_root + "limit-exchange/list",//限时兑换订单列表
        exchange_detail:_api_root + "limit-exchange/detail",//限时兑换订单详情
        exchange_order_submit:_api_root + "limit-exchange/order-submit",//限时兑换订单列表付款入口
        exchange_revoke:_api_root + "limit-exchange/revoke",//限时兑换订单列表未付款订单取消
    },

    sign_up: {


        default_index: _api_root + "sign_up/default/index",// 最新可参与活动
        default_detail: _api_root + "sign_up/default/detail",// 活动详情
        default_join: _api_root + "sign_up/default/join",// get报名信息   post活动报名参与
        default_lik: _api_root + "sign_up/default/like",// 最新可参与活动
        default_qrCode: _api_root + "sign_up/default/qr-code",// 最新可参与活动
    },
    cart: {
        new_add_cart: _api_root + "cart/new-add-cart",
        new_list: _api_root + "cart/new-list",


        list: _api_root + "cart/list",
        add_cart: _api_root + "cart/add-cart",//原版本
        delete: _api_root + "cart/delete",
        cart_edit: _api_root + "cart/cart-edit"
    },
    passport: {
        login: _api_root + "passport/login",
        on_login: _api_root + "passport/on-login",
        info:_api_root + "passport/info"
    },
    order: {
        submit_preview: _api_root + "order/submit-preview",
        submit: _api_root + "order/submit",
        pay_data: _api_root + "order/pay-data",
        uni_pay_data:_api_root + "order/uni-pay-data",
        list: _api_root + "order/list",
        revoke: _api_root + "order/revoke",
        confirm: _api_root + "order/confirm",//超爆品确认收货返爱心
        count_data: _api_root + "order/count-data",
        detail: _api_root + "order/detail",
        refund_preview: _api_root + "order/refund-preview",
        refund: _api_root + "order/refund",
        refund_detail: _api_root + "order/refund-detail",
        comment_preview: _api_root + "order/comment-preview",
        comment: _api_root + "order/comment",
        express_detail: _api_root + "order/express-detail",
        clerk: _api_root + "order/clerk",
        clerk_detail: _api_root + "order/clerk-detail",
        get_qrcode: _api_root + "order/get-qrcode",
        location: _api_root + "order/location",
        refund_send: _api_root + "order/refund-send",
        uni_submit_preview: _api_root + "order/uni-submit-preview",//购物车提交预览接口
        new_submit_preview: _api_root + "order/new-submit-preview",//原购物车提交预览接口
        uni_submit:_api_root + "order/uni-submit",//购物车订单提交接口
        new_submit: _api_root + "order/new-submit",//原购物车订单提交接口
        express_list: _api_root + "order/express-list",//快递分包，查询物流时，cout>1，表示有分包，先展示列表再进行查询，如等于1,则直接查询物流。
        pay_success:_api_root + "order/pay-success",//  参数:order_id  超爆品订单ID，登录态。
        pay_success_integral:_api_root + "order/pay-success-integral",//  超划算订单支付成功返爱心信息 参数，order_id 超划算订单信息
    },
    user: {
        order_nums: _api_root + "user/order-nums",//订单数量

        address_list: _api_root + "user/address-list",
        address_detail: _api_root + "user/address-detail",
        address_save: _api_root + "user/address-save",
        address_set_default: _api_root + "user/address-set-default",
        address_delete: _api_root + "user/address-delete",
        save_form_id: _api_root + "user/save-form-id",
        favorite_add: _api_root + "user/favorite-add",
        favorite_remove: _api_root + "user/favorite-remove",
        favorite_list: _api_root + "user/favorite-list",
        index: _api_root + "user/index",
        wechat_district: _api_root + "user/wechat-district",
        add_wechat_address: _api_root + "user/add-wechat-address",
        topic_favorite: _api_root + "user/topic-favorite",
        topic_favorite_list: _api_root + "user/topic-favorite-list",
        member: _api_root + "user/member",
        card: _api_root + "user/card",
        card_qrcode: _api_root + "user/card-qrcode",
        card_clerk: _api_root + "user/card-clerk",
        web_login: _api_root + "user/web-login",
        submit_member: _api_root + "user/submit-member",
        user_binding: _api_root + "user/user-binding",
        user_hand_binding: _api_root + "user/user-hand-binding",
        user_empower: _api_root + "user/user-empower",
        sms_setting: _api_root + "user/sms-setting",
        authorization_bind: _api_root + "user/authorization-bind",
        check_bind: _api_root + "user/check-bind",
        card_detail: _api_root + "user/card-detail"
    },
    share: {
        subcompany: _api_root + "share/get-team-of-subcompany",//获取联合创始人团队接口
        get_order_subcompany: _api_root + "share/get-order-of-subcompany",//获取联合创始人分销订单接口
        apply_subcompany: _api_root + "share/apply-of-subcompany",//联合创始人提现申请接口
        cash_detail_subcompany:_api_root + "share/cash-detail-of-subcompany",//联合创始人提现列表
        super_modules:_api_root + "share/get-order-of-super-modules",//团队订单列表
        achievement_list:_api_root + "share/achievement-list",//联合创始人业绩列表
        get_qrcode_pro:_api_root + "share/get-qrcode-pro",//推广二维码
        user_order_list:_api_root + "share/user-order-list",//团队人员订单
        team_shop_money:_api_root + "share/team-shop-money",//消费金额
        bind_and_update:_api_root + "share/bind-and-update",// 下线绑定自动升级推客、99会员接口。 参数：user_id用户ID，parent_id 推广人ID。
        live_qrcode:_api_root + "share/live-qrcode",//直播分享二维码
        
        join: _api_root + "share/join",
        check: _api_root + "share/check",
        get_info: _api_root + "share/get-info",
        get_price: _api_root + "share/get-price",
        apply: _api_root + "share/apply",
        cash_detail: _api_root + "share/cash-detail",
        get_qrcode: _api_root + "share/get-qrcode",
        shop_share: _api_root + "share/shop-share",
        bind_parent: _api_root + "share/bind-parent",
        get_team: _api_root + "share/get-team",
        get_order: _api_root + "share/get-order",
        index: _api_root + "share/index",
        get_manager: _api_root + "share/get-manager",//合伙人申请记录
        apply_manager: _api_root + "share/apply-manager",//合伙人表单申请提交接口
        partner_add_agent: _api_root + "share/partner-add-agent",//合伙人添加推客
    },
    coupon: {
        index: _api_root + "coupon/index",
        share_send: _api_root + "coupon/share-send",
        receive: _api_root + "coupon/receive",
        coupon_detail: _api_root + "coupon/detail"
    },
    miaosha: {
        list: _api_root + "miaosha/list",
        goods_list: _api_root + "miaosha/goods-list",
        details: _api_root + "miaosha/details",
        submit_preview: _api_root + "miaosha/submit-preview",
        submit: _api_root + "miaosha/submit",
        uni_pay_data:_api_root + "miaosha/uni-pay-data",//订单发起支付接口
        pay_data: _api_root + "miaosha/pay-data",//原订单发起支付接口
        order_list: _api_root + "miaosha/order-list",
        order_details: _api_root + "miaosha/order-details",
        order_revoke: _api_root + "miaosha/revoke",
        express_detail: _api_root + "miaosha/express-detail",
        confirm: _api_root + "miaosha/confirm",
        comment_preview: _api_root + "miaosha/comment-preview",
        comment: _api_root + "miaosha/comment",
        refund_preview: _api_root + "miaosha/refund-preview",
        refund: _api_root + "miaosha/refund",
        refund_detail: _api_root + "miaosha/refund-detail",
        comment_list: _api_root + "miaosha/comment-list",
        goods_qrcode: _api_root + "miaosha/goods-qrcode"
    },
    group: {
        index: _api_root + "group/index/index",
        list: _api_root + "group/index/good-list",
        details: _api_root + "group/index/good-details",
        goods_attr_info: _api_root + "group/index/goods-attr-info",
        submit_preview: _api_root + "group/order/submit-preview",
        submit: _api_root + "group/order/submit",
        pay_data: _api_root + "group/order/pay-data",
        order: {
            list: _api_root + "group/order/list",
            detail: _api_root + "group/order/detail",
            express_detail: _api_root + "group/order/express-detail",
            comment_preview: _api_root + "group/order/comment-preview",
            comment: _api_root + "group/order/comment",
            confirm: _api_root + "group/order/confirm",
            goods_qrcode: _api_root + "group/order/goods-qrcode",
            get_qrcode: _api_root + "group/order/get-qrcode",
            clerk: _api_root + "group/order/clerk",
            clerk_order_details: _api_root + "group/order/clerk-order-details",
            revoke: _api_root + "group/order/revoke",
            refund_preview: _api_root + "group/order/refund-preview",
            refund: _api_root + "group/order/refund",
            refund_detail: _api_root + "group/order/refund-detail"
        },
        group_info: _api_root + "group/order/group",
        comment: _api_root + "group/index/goods-comment",
        goods_qrcode: _api_root + "group/index/goods-qrcode",
        search: _api_root + "group/index/search"
    },
    book: {
        index: _api_root + "book/index/index",
        list: _api_root + "book/index/good-list",
        details: _api_root + "book/index/good-details",
        submit_preview: _api_root + "book/order/submit-preview",
        submit: _api_root + "book/order/submit",
        order_list: _api_root + "book/order/list",
        order_cancel: _api_root + "book/order/cancel",
        order_pay: _api_root + "book/order/pay-data",
        order_details: _api_root + "book/order/order-details",
        shop_list: _api_root + "book/index/shop-list",
        get_qrcode: _api_root + "book/order/get-qrcode",
        clerk: _api_root + "book/order/clerk",
        apply_refund: _api_root + "book/order/apply-refund",
        comment_preview: _api_root + "book/order/comment-preview",
        submit_comment: _api_root + "book/order/comment",
        goods_comment: _api_root + "book/index/goods-comment",
        goods_qrcode: _api_root + "book/index/goods-qrcode",
        clerk_order_details: _api_root + "book/order/clerk-order-details",
        goods_attr_info: _api_root + "book/index/goods-attr-info"
    },
    quick: {
        quick: _api_root + "quick/quick/quick",
        quick_goods: _api_root + "quick/quick/quick-goods",
        quick_car: _api_root + "quick/quick/quick-car"
    },
    fxhb: {
        open: _api_root + "fxhb/index/open",
        open_submit: _api_root + "fxhb/index/open-submit",
        detail: _api_root + "fxhb/index/detail",
        detail_submit: _api_root + "fxhb/index/detail-submit"
    },
    recharge: {
        index: _api_root + "recharge/index",
        list: _api_root + "recharge/list",
        submit: _api_root + "recharge/submit",
        record: _api_root + "recharge/record",
        detail: _api_root + "recharge/detail"
    },
    mch: {
        apply: _api_root + "mch/index/apply",
        apply_submit: _api_root + "mch/index/apply-submit",
        shop: _api_root + "mch/index/shop",
        shop_list: _api_root + "mch/index/shop-list",
        shop_cat: _api_root + "mch/index/shop-cat",
        user: {
            myshop: _api_root + "mch/user/myshop",
            setting: _api_root + "mch/user/setting",
            setting_submit: _api_root + "mch/user/setting-submit",
            shop_qrcode: _api_root + "mch/user/shop-qrcode",
            account: _api_root + "mch/user/account",
            cash: _api_root + "mch/user/cash",
            account_log: _api_root + "mch/user/account-log",
            cash_log: _api_root + "mch/user/cash-log",
            tongji_year_list: _api_root + "mch/user/tongji-year-list",
            tongji_month_data: _api_root + "mch/user/tongji-month-data",
            cash_preview: _api_root + "mch/user/cash-preview",
            settle_log: _api_root + "mch/user/settle-log"
        },
        goods: {
            list: _api_root + "mch/goods/list",
            set_status: _api_root + "mch/goods/set-status",
            delete: _api_root + "mch/goods/delete"
        },
        order: {
            list: _api_root + "mch/order/list",
            detail: _api_root + "mch/order/detail",
            send: _api_root + "mch/order/send",
            refund: _api_root + "mch/order/refund",
            edit_price: _api_root + "mch/order/edit-price",
            refund_detail: _api_root + "mch/order/refund-detail"
        }
    },
    integral: {
        hot_goods: _api_root + "integralmall/integralmall/hot-goods",//开心乐园人气好物
        hot_goods_list: _api_root + "integralmall/integralmall/hot-goods-list",//开心乐园人气好物热销列表
        search: _api_root + "integralmall/integralmall/search",//开心乐园搜索
        overseas_index: _api_root + "integralmall/integralmall/index-overseas",//海外购开心乐园首页
        order_text_slide: _api_root + "integralmall/integralmall/order-text-slide",//超划算订单文字轮播接口
        college_goods:_api_root + "integralmall/integralmall/college-goods",//大学生推客专享区列表

        index: _api_root + "integralmall/integralmall/index",
        coupon_info: _api_root + "integralmall/integralmall/coupon-info",
        exchange_coupon: _api_root + "integralmall/integralmall/exchange-coupon",
        integral_pay: _api_root + "integralmall/integralmall/integral-pay",
        goods_info: _api_root + "integralmall/integralmall/goods-info",
        submit_preview: _api_root + "integralmall/integralmall/new-submit-preview",
        submit: _api_root + "integralmall/integralmall/new-submit",
        list: _api_root + "integralmall/integralmall/list",
        revoke: _api_root + "integralmall/integralmall/revoke",
        order_submit: _api_root + "integralmall/integralmall/order-submit",
        confirm: _api_root + "integralmall/integralmall/confirm",
        get_qrcode: _api_root + "integralmall/integralmall/get-qrcode",
        clerk_order_details: _api_root + "integralmall/integralmall/clerk-order-details",
        clerk: _api_root + "integralmall/integralmall/clerk",
        explain: _api_root + "integralmall/integralmall/explain",
        exchange: _api_root + "integralmall/integralmall/exchange",
        register: _api_root + "integralmall/integralmall/register",
        integral_detail: _api_root + "integralmall/integralmall/integral-detail",
        goods_list: _api_root + "integralmall/integralmall/goods-list",
        roll_screen: _api_root + "integralmall/integralmall/roll-screen",
        luck_draw: _api_root + "integralmall/integralmall/luck-draw",
        integralmall_goods_list: _api_root + "integralmall/integralmall/goods-list",//每日爆款
        luck_draw_log: _api_root + "integralmall/integralmall/luck-draw-log",//抽奖记录
    },
    integral_lottery:{
        index:_api_root + "integral_lottery/default/index",//抽奖列表
        sign:_api_root + "integral_lottery/default/sign",//参与抽奖
        sign_log:_api_root + "integral_lottery/default/sign-log",//抽奖记录
        address_save:_api_root + "integral_lottery/default/address-save",//中奖添加收货地址
        get_express:_api_root + "integral_lottery/default/get-express",//物流信息接口
        msg_notiction:_api_root + 'integral_lottery/default/msg-notiction',//超免费轮播
        index_second:_api_root + 'integral_lottery/default/index-second',//新抽奖列表
        index_three:_api_root + 'integral_lottery/default/index-three',//新抽奖列表11
    },
    pond: {
        index: _api_root + "pond/pond/index",
        lottery: _api_root + "pond/pond/lottery",
        prize: _api_root + "pond/pond/prize",
        send: _api_root + "pond/pond/send",
        setting: _api_root + "pond/pond/setting",
        submit: _api_root + "pond/pond/submit",
        qrcode: _api_root + "pond/pond/qrcode"
    },
    bargain: {
        index: _api_root + "bargain/default/index",
        goods: _api_root + "bargain/default/goods",
        bargain_submit: _api_root + "bargain/order/bargain-submit",
        activity: _api_root + "bargain/order/activity",
        bargain: _api_root + "bargain/order/bargain",
        order_list: _api_root + "bargain/order/order-list",
        setting: _api_root + "bargain/default/setting",
        goods_user: _api_root + "bargain/default/goods-user",
        qrcode: _api_root + "bargain/default/qrcode",
        default_index:_api_root + 'bargain/default/index',//超砍价轮播
    },
    scratch: {
        index: _api_root + "scratch/scratch/index",
        receive: _api_root + "scratch/scratch/receive",
        setting: _api_root + "scratch/scratch/setting",
        prize: _api_root + "scratch/scratch/prize",
        submit: _api_root + "scratch/scratch/submit",
        log: _api_root + "scratch/scratch/log",
        qrcode: _api_root + "scratch/scratch/qrcode"
    },
    lottery: {
        index: _api_root + "lottery/default/index",
        prize: _api_root + "lottery/default/prize",
        detail: _api_root + "lottery/default/detail",
        goods: _api_root + "lottery/default/goods",
        submit: _api_root + "lottery/default/submit",
        qrcode: _api_root + "lottery/default/qrcode",
        setting: _api_root + "lottery/default/setting",
        lucky_code: _api_root + "lottery/default/lucky-code",
        clerk: _api_root + "lottery/default/clerk"
    },
    diy: {
        detail: _api_root + "diy/diy-template/detail"
    },
    step: {
        index: _api_root + "step/default/index",
        setting: _api_root + "step/default/setting",
        qrcode: _api_root + "step/default/qrcode",
        log: _api_root + "step/default/log",
        convert: _api_root + "step/default/convert",
        ranking: _api_root + "step/default/ranking",
        goods: _api_root + "step/default/goods",
        activity: _api_root + "step/default/activity",
        activity_join: _api_root + "step/default/activity-join",
        activity_detail: _api_root + "step/default/activity-detail",
        submit: _api_root + "step/default/submit",
        activity_log: _api_root + "step/default/activity-log",
        activity_submit: _api_root + "step/default/activity-submit",
        remind: _api_root + "step/default/remind",
        pic_list: _api_root + "step/default/pic-list",
        invite_detail: _api_root + "step/default/invite-detail"
    }
};

module.exports = api;